package com.wind.Model01_创建模式.创建模式02_工厂方法And抽象工厂.设计模式;

import org.junit.Test;

public class ModelTest {

    @Test
    public void test() {
        AnimalFactory factory = new AnimalFactory();
        Animal cat = factory.getAnimal("cat");
        Animal dog = factory.getAnimal("dog");
        cat.eat();
        dog.eat();
    }
}